/* 微信风格在线用户弹窗 */
.online-users-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.online-users-modal.show {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    margin: auto;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

/* 在更大的屏幕上使用更宽的弹窗 */
@media (min-width: 768px) {
    .modal-container {
        width: 80%;
        max-width: 700px;
    }
}

@media (min-width: 1024px) {
    .modal-container {
        width: 70%;
        max-width: 800px;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e7e7e7;
    background: #07c160;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.modal-search {
    padding: 12px 16px;
    background: #f7f7f7;
    border-bottom: 1px solid #e7e7e7;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    padding: 0 12px;
    height: 38px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-box i {
    color: #969696;
    margin-right: 8px;
    font-size: 14px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background: none;
    color: #333;
}

.search-box input::placeholder {
    color: #969696;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.users-list {
    padding: 0;
}

.user-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
    /*transition: background-color 0.15s ease;*/
    background: #ffffff;
}

.user-item:hover {
    background: #f7f7f7;
}

.user-item:last-child {
    border-bottom: none;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    background: linear-gradient(135deg, #07c160, #06ae56);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-avatar i {
    color: white;
    font-size: 18px;
}

.user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-name {
    font-size: 16px;
    font-weight: 400;
    color: #191919;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.current-user {
    font-size: 12px;
    color: #07c160;
    font-weight: normal;
}

.admin-badge {
    background: #ff9500;
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.user-status {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #969696;
    flex-shrink: 0;
}

.online-dot {
    width: 6px;
    height: 6px;
    background: #07c160;
    border-radius: 50%;
    margin-right: 4px;
    animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    align-items: center;
}

.action-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    min-width: 85px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn i {
    margin-right: 4px;
    font-size: 11px;
}

.kick-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.kick-btn:hover {
    background: linear-gradient(135deg, #ff8787, #ff6b6b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.kick-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.promote-btn {
    background: linear-gradient(135deg, #07c160, #06ae56);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.promote-btn:hover {
    background: linear-gradient(135deg, #36d174, #07c160);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.4);
}

.promote-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
    text-align: center;
}

.loading-state i {
    font-size: 24px;
    margin-bottom: 12px;
    color: #07c160;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #d9d9d9;
}

.empty-state span {
    font-size: 14px;
}

/* 踢出确认对话框样式优化 */
.kick-modal {
    z-index: 1100;
}

.kick-modal-content {
    border-radius: 12px;
    border: none;
}

.kick-modal-header h3 {
    color: #333;
    font-size: 18px;
}

.kick-reason textarea {
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    resize: none;
}

.kick-reason textarea:focus {
    border-color: #07c160;
    box-shadow: 0 0 0 2px rgba(7, 193, 96, 0.2);
}

.kick-modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #d9d9d9;
}

.kick-modal-btn.cancel:hover {
    background: #e8e8e8;
}

.kick-modal-btn.confirm {
    background: #ff4d4f;
    border: 1px solid #ff4d4f;
}

.kick-modal-btn.confirm:hover {
    background: #ff7875;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 85vh;
    }

    .user-item {
        padding: 16px;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
    }

    .user-avatar i {
        font-size: 16px;
    }

    .user-actions {
        flex-direction: column;
        gap: 4px;
    }

    .action-btn {
        padding: 8px;
        font-size: 11px;
    }
}

/* 隐藏原来的管理员面板样式 */
.admin-panel {
    display: none !important;
}
